
<template>
  <div>
    <FirstContent/>
    <SecondContent/>
  </div>
</template>
<script lang="ts" setup>
import FirstContent from "@/component/firstContent.vue"
import SecondContent from "@/component/secondContent.vue"
import { useAllStore } from "~/stores/index";
import { storeToRefs } from "pinia";
// const loading=ref(false)
const store = useAllStore();
 let {getOppoDetailInfo,getProject}= storeToRefs(store) 
 const route=useRoute()
let link=route.query.link
let eid=route.params.ename
async function getDetail(){
if(!getOppoDetailInfo.value){
  await store.getInfoAc({link:link,eid:eid})
  }
  //   if(!getProject.value){
  // await store.getProjected({link:link,eid:eid})
  // }
 }
 async function getDetail1(){
  if(!getProject.value){
  await store.getProjected({link:link,eid:eid})
  }
 }
//  为什么分开就不会重复发请求 是因为在一块的时候 await时间太长吗 fetch到底会不会导致重复请求 
getDetail()
getDetail1()
onMounted(()=>{
//  loading.value=true
})
</script>

<style scoped></style>
